<template>
	<u-popup :show="show" mode="center" width="630rpx" round="30rpx">
		<view class="agent-box d-font-28">
			<view class="d-p-30 d-text-center">{{ title }}</view>
			<scroll-view scroll-y class="agent-content d-p-l-30 d-p-r-30"><u-parse :content="content"></u-parse></scroll-view>
			<view class="d-flex d-row-center d-p-t-20 d-p-b-20">
				<view>
					<u-button
						type="primary"
						shape="circle"
						:custom-style="{
							fontSize: '24rpx',
							background: '#59A0FF',
							width: '180rpx',
							height: '70rpx'
						}"
						@click="confirm"
					>
						我知道了
					</u-button>
				</view>
			</view>
		</view>
	</u-popup>
</template>

<script>
export default {
	name: 'd-agent',
	props: {
		show: {
			type: Boolean,
			default: false
		},
		title: {
			type: String,
			default: '协议标题'
		},
		content: {
			type: String,
			default: '协议内容'
		}
	},
	methods: {
		confirm() {
			this.$emit('confirm');
		}
	}
};
</script>

<style lang="scss">
.agent-box {
	width: 630rpx;
	border-radius: 30rpx;
	background-color: #fff;
}
.agent-content {
	height: 600rpx;
	box-sizing: border-box;
}
</style>
